import { NgModule, Inject } from '@angular/core';
import { SharedModule } from '@shared';
import { UserRoutingModule } from './user-routing.module';
import { UserLayoutComponent } from './_layout/layout.component';
import { ALAIN_I18N_TOKEN } from '@delon/theme';
import { I18NService } from '@core';
import { default as zh_CN } from './_i18n/zh-CN';
import { default as en_US } from './_i18n/en-US';
import { UserInfoBasicComponent } from './basic/userinfo-basic.component';
import { UserSecurityComponent } from './security/security-component';
import { ChangePwdComponent } from './security/changepwd/change-pwd.component';
import { SecurityPhoneComponent } from './security/secphone/security-phone.component';
import { ThirdBindComponent } from './security/bind/third-bind.component';

const COMPONENTS = [
  UserLayoutComponent,
  UserInfoBasicComponent,
  UserSecurityComponent,
  ChangePwdComponent,
  SecurityPhoneComponent,
  ThirdBindComponent,
];
const COMPONENTS_NOROUNT = [];

@NgModule({
  imports: [SharedModule, UserRoutingModule],
  declarations: [...COMPONENTS, ...COMPONENTS_NOROUNT],
  entryComponents: COMPONENTS_NOROUNT,
})
export class UserModule {
  constructor(@Inject(ALAIN_I18N_TOKEN) i18n: I18NService) {
    i18n.load('zh-CN', zh_CN);
    i18n.load('en-US', en_US);
  }
}
